package nongchang.kuaijiecaifu.com.ncapp_android.ui.fragment.basketdetailfragment;

import android.content.Context;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.bumptech.glide.Glide;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import nongchang.kuaijiecaifu.com.ncapp_android.R;
import nongchang.kuaijiecaifu.com.ncapp_android.common.fragment.BaseFragment;

import nongchang.kuaijiecaifu.com.ncapp_android.retrofit.good.ShowImage;
import nongchang.kuaijiecaifu.com.ncapp_android.ui.adapter.ImageAdapter;

/**
 * Created by Administrator on 2016/3/11 0011.
 */
public class BasketGoodDetailFragment extends BaseFragment {
    @BindView(R.id.list)
    RecyclerView recyclerView;
    private ImageAdapter adapter;
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View view = inflater.inflate(R.layout.fragment_basket_good_detail, container, false);
        return view;
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        ButterKnife.bind(this, getView());
        List<ShowImage> list = new ArrayList<>();
        ShowImage item=null;
        String[] image=new String[]{"http://img5.imgtn.bdimg.com/it/u=4072748272,2458161677&fm=21&gp=0.jpg","http://pic2.cxtuku.com/00/03/09/b781dadb9bdb.jpg","http://img2.3lian.com/2014/f5/13/d/48.jpg"};
        for(int i=0;i<3;i++){
             item=new ShowImage();
            item.image=image[i];
            list.add(item);
        }

        adapter=new ImageAdapter(getContext());
        recyclerView.setAdapter(adapter);
        adapter.update(list);
    }

}
